<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定义 JavaScript 对象可以跨越多行，空格跟换行不是必须的</title>
</head>

<body>
    <p>创建JavaScript对象。</p>
    <p id="demo"></p>
    <script>
        // 定义 JavaScript 对象可以跨越多行，空格跟换行不是必须的：
        var person = {
            firstName: "John",
            lastName: "Doe",
            age: 50,
            eyeColor: "blue"
        };
        document.getElementById("demo").innerHTML = person.firstName + " 现在 " + person.age + " 岁。";
    </script>
</body>

</html>